home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Lib / x400 / tokens.py < prev    next >
Encoding:
Text File  |  1991-12-18  |  3.0 KB  |  133 lines

  1. -- tokens.py: 
  2.  
  3.  
  4. -- @(#) $Header: /xtel/pp/pp-beta/Lib/x400/RCS/tokens.py,v 6.0 1991/12/18 20:25:37 jpo Rel $
  5. --
  6. -- $Log: tokens.py,v $
  7. -- Revision 6.0  1991/12/18  20:25:37  jpo
  8. -- Release 6.0
  9. --
  10. --
  11. --
  12.  
  13. -- Security related definitions from X.400
  14. -- Version 1 December 1988
  15. -- Author: M.Roe, University College London
  16.  
  17.  
  18. Toks 
  19. -- {iso identified-organisation(3) locator(99) modules(0) tokens(2)}
  20. DEFINITIONS IMPLICIT TAGS ::=
  21. BEGIN
  22.  
  23. IMPORTS 
  24.    Encrypted, SignedType, Signature, Protected, AlgorithmIdentifier, 
  25.    Certificate, EncryptionKey
  26.    FROM Auth;
  27.  
  28.  
  29. --    Security Label
  30.  
  31. SecurityContext ::= SET SIZE (1..ub-security-labels) OF SecurityLabel
  32.  
  33. SecurityLabel ::= SET {
  34.     security-policy-identifier SecurityPolicyIdentifier OPTIONAL,
  35.     security-classification SecurityClassification OPTIONAL,
  36.     privacy-mark PrivacyMark OPTIONAL,
  37.     security-categories SecurityCategories OPTIONAL }
  38.  
  39. SecurityPolicyIdentifier ::= OBJECT IDENTIFIER
  40.  
  41. SecurityClassification ::= INTEGER {
  42.     unmarked (0),
  43.     unclassified (1),
  44.     restricted (2),
  45.     confidential (3),
  46.     secret (4),
  47.     top-secret (5) } (0..ub-integer-options)
  48.  
  49. PrivacyMark ::= PrintableString (SIZE (1..ub-privacy-mark-length))
  50.  
  51. SecurityCategories ::= SET SIZE (1..ub-security-categories) OF SecurityCategory
  52.  
  53. SecurityCategory ::= SEQUENCE {
  54.     type [0] OBJECT IDENTIFIER,
  55.     value [1] ANY}
  56.  
  57. -- Proof of Delivery
  58.  
  59. ProofOfDelivery ::=
  60.    SET {
  61.       certificates [0] Certificates OPTIONAL,
  62.       signature    [1] Signature OPTIONAL}
  63.  
  64. ProofOfDeliveryBody ::=
  65.    SEQUENCE {
  66.        algorithm AlgorithmIdentifier,
  67.        time UTCTime,
  68.        recipient  ANY,
  69.        content OCTET STRING}
  70.        
  71. -- We don't handle certification paths at the moment
  72. Certificates ::= 
  73.     SEQUENCE {
  74.         certificate Certificate}
  75.  
  76. -- Tokens
  77.  
  78. Token ::=
  79.    SEQUENCE {
  80.       type  OBJECT IDENTIFIER,
  81.       token [1] ANY}
  82.  
  83. TokenData ::=
  84.     SEQUENCE {
  85.        type  [0] INTEGER,
  86.        value [1] ANY}
  87.  
  88. AsymmetricToken ::= SignedType
  89.  
  90. AsymmetricTokenBody ::=
  91.    SEQUENCE {
  92.       signature-algorithm-identifier    AlgorithmIdentifier,
  93.       time                Nonce,
  94.       signed-data            [0] TokenData OPTIONAL,
  95.       encryption-algorithm-identifier    [1] AlgorithmIdentifier OPTIONAL,
  96.       encrypted-data            [2] Encrypted OPTIONAL}
  97.  
  98. SymmetricToken ::= 
  99.    SEQUENCE {
  100.       algorithm        AlgorithmIdentifier,
  101.       encrypted-data    Encrypted}
  102.  
  103. SymmetricTokenBody ::=
  104.    SEQUENCE {
  105.       time        Nonce,
  106.       data        TokenData}
  107.       
  108. Nonce ::=
  109.    CHOICE {
  110.       time    Time,
  111.       random    RandomNumber}
  112.       
  113. RandomNumber ::=
  114.    BIT STRING
  115.  
  116. MessageTokenSignedData ::=
  117.    SEQUENCE {
  118.       content-confidentiality-algorithm [0] AlgorithmIdentifier    OPTIONAL,
  119.       content-integrity-check        [1] Signature        OPTIONAL,
  120.       message-sequence-number        [4] INTEGER        DEFAULT 0}
  121.  
  122. MessageTokenEncryptedData ::=
  123.    SEQUENCE {
  124.       content-confidentiality-key    [0] EncryptionKey    OPTIONAL,
  125.       content-integrity-check        [1] Signature        OPTIONAL,
  126.       content-integrity-key        [3] EncryptionKey    OPTIONAL,
  127.       message-sequence-number        [4] INTEGER        DEFAULT 0}
  128.  
  129. Time ::= UTCTime
  130.  
  131. END
  132.  
  133.